Kanzi 4.0.0-beta2
kanzi::LegacyGraphicsOutput Class Reference

LegacyGraphicsOutput class. More...

#include <kanzi/core.ui/platform/graphics_output/legacy/legacy_graphics_output.hpp>

Inheritance diagram for kanzi::LegacyGraphicsOutput:
[legend]

Public Member Functions

bool bringToFront () noexcept override
 WindowedGraphicsOutput::bringToFront() implementation.
 
struct KzsDesktopgetDesktop () const
 Gets associated legacy desktop.
 
struct KzsDisplaygetDisplay (size_t index) const
 Access associated legacy display by index.
 
NativeInputHandle getNativeInputHandle ()
 Gets the associated native input handle.
 
optional< NativeWindowHandlegetNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation.
 
KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle getOrientationAngle () const
 Gets legacy orientation angle.
 
Matrix4x4 getTargetTransformation () const noexcept override
 FramebufferGraphicsOutput::getTargetTransformation() implementation.
 
struct KzsWindowgetWindow () const
 Gets associated legacy window.
 
optional< unsigned intgetWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation.
 
optional< intgetWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation.
 
optional< intgetWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation.
 
optional< string > getWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation.
 
optional< unsigned intgetWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation.
 
void handleEvents (EventQueue &eventQueue)
 Handles the window resize event.
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation.
 
 LegacyGraphicsOutput (const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties, const NativeDesktopProperties *desktopProperties)
 Constructor.
 
 LegacyGraphicsOutput (NativeWindowHandle handle, const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties, const NativeDesktopProperties *desktopProperties)
 Constructor.
 
void logExtensions () const
 Logs the extensions of the graphics context.
 
void logProperties () const
 Logs the properties of the graphics output.
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation.
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation.
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation.
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation.
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation.
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation.
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation.
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation.
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation.
 
 ~LegacyGraphicsOutput () override
 Destructor.
 
- Public Member Functions inherited from kanzi::GraphicsOutput
KZ_NO_DISCARD Vector2 getDpi () const noexcept
 Returns the resolution of the target coordinate system in dots per inch.
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system.
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system.
 
virtual ~GraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::FramebufferGraphicsOutput
 FramebufferGraphicsOutput ()
 Constructor.
 
KZ_NO_DISCARD const FramebuffergetFramebuffer () const noexcept
 Returns the framebuffer for the Graphics Output.
 
KZ_NO_DISCARD FramebuffergetFramebuffer () noexcept
 Returns the framebuffer for the Graphics Output.
 
virtual ~FramebufferGraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor.
 

Protected Member Functions

virtual EventQueue::ProcessingResult handleEvent (InputEvent *event)
 Handles a single event from a queue.
 
void setTargetTransformation (Matrix4x4 targetTransformation)
 Sets the target transformation.
 
void updateCachedValues (unsigned int width, unsigned int height)
 Updates all cached values from given layout size.
 
void updateSurfaceSize (unsigned int width, unsigned int height)
 Resizes the surface to match given layout size.
 
void updateTargetTransformation (unsigned int width, unsigned int height)
 Modifies the target transformation to match given layout size.
 
virtual void windowResizedOverride (unsigned int width, unsigned int height)
 Called whenever window size has changed.
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution.
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size.
 

Protected Attributes

struct KzsDesktopm_desktop
 Legacy desktop for application.
 
platform::SurfaceProperties m_surfaceProperties
 
struct KzsWindowm_window
 System-dependent window implementation.
 

Detailed Description

LegacyGraphicsOutput class.

A graphics output implementation that provides basic GL rendering output.

Constructor & Destructor Documentation

◆ LegacyGraphicsOutput() [1/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( const struct KzsSurfaceProperties * surfaceProperties,
const NativeWindowProperties * windowProperties,
const NativeDesktopProperties * desktopProperties )
explicit

Constructor.

Parameters
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the associated window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.

◆ LegacyGraphicsOutput() [2/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( NativeWindowHandle handle,
const struct KzsSurfaceProperties * surfaceProperties,
const NativeWindowProperties * windowProperties,
const NativeDesktopProperties * desktopProperties )
explicit

Constructor.

Parameters
handleHandle to an existing window.
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.

◆ ~LegacyGraphicsOutput()

kanzi::LegacyGraphicsOutput::~LegacyGraphicsOutput ( )
override

Destructor.

Member Function Documentation

◆ getTargetTransformation()

Matrix4x4 kanzi::LegacyGraphicsOutput::getTargetTransformation ( ) const
inlineoverridevirtualnoexcept

◆ getOrientationAngle()

KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle kanzi::LegacyGraphicsOutput::getOrientationAngle ( ) const

Gets legacy orientation angle.

New code should use GLGraphicsOutput::getTargetTransformation() instead.

Returns
Display orientation angle.

◆ handleEvents()

void kanzi::LegacyGraphicsOutput::handleEvents ( EventQueue & eventQueue)

Handles the window resize event.

Parameters
eventQueueQueue holding the events to handle.

◆ logProperties()

void kanzi::LegacyGraphicsOutput::logProperties ( ) const

Logs the properties of the graphics output.

◆ logExtensions()

void kanzi::LegacyGraphicsOutput::logExtensions ( ) const

Logs the extensions of the graphics context.

◆ getNativeInputHandle()

NativeInputHandle kanzi::LegacyGraphicsOutput::getNativeInputHandle ( )

Gets the associated native input handle.

Returns
Native input handle.

◆ getDesktop()

struct KzsDesktop * kanzi::LegacyGraphicsOutput::getDesktop ( ) const

Gets associated legacy desktop.

Returns
Desktop.

◆ getWindow()

struct KzsWindow * kanzi::LegacyGraphicsOutput::getWindow ( ) const

Gets associated legacy window.

Returns
Window.

◆ getDisplay()

struct KzsDisplay * kanzi::LegacyGraphicsOutput::getDisplay ( size_t index) const

Access associated legacy display by index.

Parameters
indexDisplay index to access.
Returns
Display at given index or nullptr.

◆ resize()

bool kanzi::LegacyGraphicsOutput::resize ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

◆ setWindowTitle()

bool kanzi::LegacyGraphicsOutput::setWindowTitle ( string_view title)
overridevirtualnoexcept

◆ getWindowTitle()

optional< string > kanzi::LegacyGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ resizeWindow()

bool kanzi::LegacyGraphicsOutput::resizeWindow ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

WindowedGraphicsOutput::resizeWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowWidth()

optional< unsigned int > kanzi::LegacyGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

◆ getWindowHeight()

optional< unsigned int > kanzi::LegacyGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

◆ moveWindow()

bool kanzi::LegacyGraphicsOutput::moveWindow ( int positionX,
int positionY )
overridevirtualnoexcept

◆ getWindowPositionX()

optional< int > kanzi::LegacyGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

optional< int > kanzi::LegacyGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::LegacyGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeRegular()

bool kanzi::LegacyGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeRegular() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMaximized()

bool kanzi::LegacyGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMaximized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMinimized()

bool kanzi::LegacyGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMinimized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ showWindow()

bool kanzi::LegacyGraphicsOutput::showWindow ( )
overridevirtualnoexcept

◆ hideWindow()

bool kanzi::LegacyGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::hideWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ bringToFront()

bool kanzi::LegacyGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

WindowedGraphicsOutput::bringToFront() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getNativeWindowHandle()

optional< NativeWindowHandle > kanzi::LegacyGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

◆ setTargetTransformation()

void kanzi::LegacyGraphicsOutput::setTargetTransformation ( Matrix4x4 targetTransformation)
inlineprotected

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.

◆ updateTargetTransformation()

void kanzi::LegacyGraphicsOutput::updateTargetTransformation ( unsigned int width,
unsigned int height )
protected

Modifies the target transformation to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateSurfaceSize()

void kanzi::LegacyGraphicsOutput::updateSurfaceSize ( unsigned int width,
unsigned int height )
protected

Resizes the surface to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateCachedValues()

void kanzi::LegacyGraphicsOutput::updateCachedValues ( unsigned int width,
unsigned int height )
protected

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ windowResizedOverride()

virtual void kanzi::LegacyGraphicsOutput::windowResizedOverride ( unsigned int width,
unsigned int height )
inlineprotectedvirtual

Called whenever window size has changed.

Parameters
widthNew window content area width in pixels.
heightNew window content area height in pixels.

◆ handleEvent()

virtual EventQueue::ProcessingResult kanzi::LegacyGraphicsOutput::handleEvent ( InputEvent * event)
protectedvirtual

Handles a single event from a queue.

Parameters
eventEvent to handle.
Returns
Processing result.

Member Data Documentation

◆ m_desktop

struct KzsDesktop* kanzi::LegacyGraphicsOutput::m_desktop
protected

Legacy desktop for application.

◆ m_window

struct KzsWindow* kanzi::LegacyGraphicsOutput::m_window
protected

System-dependent window implementation.

◆ m_surfaceProperties

platform::SurfaceProperties kanzi::LegacyGraphicsOutput::m_surfaceProperties
protected

The documentation for this class was generated from the following file: